using System;
using Kiwi.Container.Activation;
using Kiwi.Container.Registration;

namespace Kiwi.Container
{
    public static class Component
    {
        public static IComponentRegistration<T> Define<T>(Func<IComponentResolver, T> creator)
        {
            return new ComponentRegistration<T, T>(new LambdaComponentActivator<T, T>(creator));
        }

        public static IComponentRegistration<T> Define<T, C>(Func<IComponentResolver, C> creator) where C : T
        {
            return new ComponentRegistration<T, C>(new LambdaComponentActivator<T, C>(creator));
        }
    }
}